<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>交易大厅</title>
    <!-- CSS -->
    <link rel="stylesheet" href="{url:#css/materialize.min.css}"/>
    <link rel="stylesheet" href="{url:#css/me.css}"/>
    <link rel="stylesheet" href="{url:#css/iconfont.css}"/>
    <style type="text/css">
        .data-list {
            position: relative;
            overflow: hidden;
            background-color: #ffffff;
        }

        .data-list .item {
            box-sizing: content-box;
            position: relative;
            border-bottom: #eeeeee solid 1px;
            padding: 10px 0px;
        }

        .data-list .item .intro {
            color: #666666;
            font-size: 12px;
        }

        .data-list .item .intro span {
            color: #222222;
            font-size: 12px;
            margin-left: 10px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .data-list .item .num {
            margin-top: 5px;
            color: #666666;
            font-size: 12px;
        }

        .data-list .item .num span {
            color: red;
            font-size: 12px;
            margin-left: 10px;
        }

        .data-list .item .num i {
            font-size: 12px;
            margin-left: 10px;
            text-decoration: none;
            font-style: normal;
        }

        .data-list .btn-buy {
            right: 0px;
            top: 10px;
            bottom: 10px;
            vertical-align: middle;
            position: absolute;
            border: none;
            text-align: center;
            box-sizing: border-box;
            padding: 0px 15px;
        }

    </style>
    <!-- JS -->
    <script src="{url:#js/jquery-1.11.3.min.js}"></script>
    <script src="{url:#js/materialize.min.js}"></script>
    <script src="{url:#js/home/register.js}"></script>
    <script src="{url:#js/yang_check.js}"></script>
</head>
<body class="q-body">
<!-- TitleBar 开始 -->
<div class="navbar-fixed">
    <nav>
        <div class="nav-wrapper red accent-4 valign-wrapper">
            <ul class="left" id="nav-btn-left">
                <li><a><i class="iconfont">&#xe63c;</i></a></li>
            </ul>
            <span class="title-bar-size center_align">转账记录</span>
            <ul class="right">
                <li><a class="disabled" style="visibility:hidden"><i class="iconfont">&#xe63c;</i></a></li>
            </ul>
        </div>
    </nav>
</div>
<!-- TitleBar 结束 -->

<div class="container">

    <div class="row">
        <div class="col s12">
            <ul class="tabs">
                <li class="tab col s6"><a class="active" href="#test1">转出记录</a></li>
                <li class="tab col s6"><a href="#test2">转入记录</a></li>
            </ul>
        </div>
        <div id="test1" class="col s12">
            <div class="q-reg-box">
                <table class="highlight responsive-table">
                    <thead>
                    <tr>
                        <th>转账时间</th>
                        <th>转入用户</th>
                        <th>转账金额</th>
                        <th>账户类型</th>
                        <th>备注</th>
                        
                    </tr>
                    </thead>
                    {query:name=zz where=from_user_id eq $user[id] order=id desc page=1 id=$obj pagesize=20}
					<tr class="{if:$key%2==1}odd{else:}even{/if}">
						<td style="text-align:center;">{$item['time']}</td> 
						<td style="text-align:center;">{echo:Common::get_user_obj($item['to_user_id'])['name']}</td>
						<td style="text-align:center;">{$currency_symbol}{$item['je']}</td>
						<td style="text-align:center;">
							{if:$item['lx']=='currency_point'}
								通用积分
							{/if}
						</td>
						<td style="text-align:center;">{$item['bz']}</td>
					</tr>
					{/query}
                    
                </table>
            </div>
        </div>
        <div id="test2" class="col s12">
            <div class="q-reg-box">
                <table class="highlight responsive-table">
                    <thead>
                    <tr>
                        <th>转账时间</th>
                        <th>转出用户</th>
                        <th>转账金额</th>
                        <th>账户类型</th>
                        <th>备注</th>
                    </tr>
                    </thead>
                    {query:name=zz where=to_user_id eq $user[id] order=id desc page=1 id=$o pagesize=20}
					<tr class="{if:$key%2==1}odd{else:}even{/if}">
						<td style="text-align:center;">{$item['time']}</td> 
						<td style="text-align:center;">{$item['uname']}</td>
						<td style="text-align:center;">{$currency_symbol}{$item['je']}</td>
						<td style="text-align:center;">
							{if:$item['lx']=='currency_point'}
								通用积分
							{/if}
						</td>
						<td style="text-align:center;">{$item['bz']}</td>
					</tr>
					{/query}
                    <!-- 
                    <tr>
                        <td>2016-07-20</td>
                        <td>88</td>
                        <td>100</td>
                        <td>50</td>
                        <td>50</td>
                        <td>8800</td>
                        <td>出售复投</td>
                        <td>
                            <button class="btn waves-light waves-effect">撤销</button>
                        </td>
                    </tr>
                    <tr>
                        <td>2016-07-20</td>
                        <td>88</td>
                        <td>100</td>
                        <td>50</td>
                        <td>50</td>
                        <td>8800</td>
                        <td>出售复投</td>
                        <td>
                            <button class="btn waves-light waves-effect">撤销</button>
                        </td>
                    </tr>
                    <tr>
                        <td>2016-07-20</td>
                        <td>88</td>
                        <td>100</td>
                        <td>50</td>
                        <td>50</td>
                        <td>8800</td>
                        <td>出售复投</td>
                        <td>
                            <button class="btn waves-light waves-effect">撤销</button>
                        </td>
                    </tr>
                    <tr>
                        <td>2016-07-20</td>
                        <td>88</td>
                        <td>100</td>
                        <td>50</td>
                        <td>50</td>
                        <td>8800</td>
                        <td>出售复投</td>
                        <td>
                            <button class="btn waves-light waves-effect">撤销</button>
                        </td>
                    </tr>
                    -->
                </table>
            </div>
        </div>
    </div>

</div>
<script type="text/javascript">
function go_back_sell(obj,id)
{
	if(confirm('确定要执行此操作吗?'))
	{
		$(obj).attr('disabled', true);
		$.post("{url:/mobile/go_back_sell}",{id:id},function(data){
			if(data['status'] == 'success')
			{
				yang_alert(data['msg']);
        		
				window.location.href = "{url:/mobile/my_transaction}";
			}
			else
			{
				alert(data['msg']);
				$(obj).attr('disabled', false);
			}
			
		},'json');
	}
	else
	{
		return false;	
	}
}
</script>
</body>
</html>
